﻿using Newtonsoft.Json;

namespace VueShopApi.Dtos
{
    public class UserDto
    {
        public int Id { get; set; }

        [JsonProperty("role_name")]
        public string RoleName { get; set; } = "超级管理员";

        [JsonProperty("username")]
        public string UserName { get; set; }

        [JsonProperty("create_time")]
        public int CreateTime { get; set; }

        public string Mobile { get; set; }

        public string Email { get; set; }

        [JsonProperty("mg_state")]
        public bool MgState { get; set; }
    }

    public class UserIncludeRoleDto
    {
        /// <summary>
        /// 主键id
        /// </summary>
        public int MgId { get; set; }

        public string MgEmail { get; set; }

        public string MgMobile { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string MgName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string MgPwd { get; set; }

        /// <summary>
        /// 1：表示启用 0:表示禁用
        /// </summary>
        public int? MgState { get; set; } = 1;

        /// <summary>
        /// 注册时间
        /// </summary>
        public int MgTime { get; set; }

        /// <summary>
        /// 角色id
        /// </summary>
        public int RoleId { get; set; } = 0;

        /// <summary>
        /// 控制器-操作,控制器-操作,控制器-操作
        /// </summary>
        public string PsCa { get; set; }

        /// <summary>
        /// 权限ids,1,2,5
        /// </summary>
        public string PsIds { get; set; }

        public string RoleDesc { get; set; }

        /// <summary>
        /// 角色名称
        /// </summary>
        public string RoleName { get; set; }
    }
}
